package cn.wdm.basic.util;

import lombok.Data;
@Data
public class AjaxResult {
    private Boolean success = true;
    private String message = "操作成功！！";
    private Object resultObj;//返回操作的额外参数

    public static AjaxResult me(){
        return new AjaxResult();
    }
    /**
     * jdk  1.8的链式编程思维
     */
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }
    public AjaxResult setResultObj(Object obj) {
        this.resultObj = obj;
        return this;
    }
    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }
}
